import React, { PureComponent } from 'react';
import styles from './KXIcons.less';

export default class KXIcons extends PureComponent {
  render() {
    const { icon } = this.props;
    if (icon && icon.length > 0) {
      const icons = icon.map((item,index)=>
        <label key={`icons1${index}`} className={styles[item.dom_class]} style={{marginRight:'8px'}} title={item.title}></label>
      );
      return (
        <span style={{position:'relative'}}>{icons}</span>
      );
    } else {
      return '';
    }
    
  }
}